package com.example.hotsearchplatform.service.impl;


import com.example.hotsearchplatform.dto.HotSearchForward5DTO;
import com.example.hotsearchplatform.mapper.InformationMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.hotsearchplatform.mapper.AnalysisMapper;
import com.example.hotsearchplatform.mapper.InformationMapper;
import com.example.hotsearchplatform.pojo.entity.Information;
import com.example.hotsearchplatform.service.InformationService;
import com.example.hotsearchplatform.vo.InfoLookVO;
import com.example.hotsearchplatform.vo.searchCountVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class InformationServiceImpl extends ServiceImpl<InformationMapper, Information> implements InformationService {
    @Autowired
    private InformationMapper informationMapper;




    public List<HotSearchForward5DTO> getColumnChart() {
        List<HotSearchForward5DTO> hotSearchForward5DTOS = informationMapper.selectTop5SearchNum();
        return hotSearchForward5DTOS;
    }

    /**
     *  最新浏览量排名top10
     * @return
     */
    @Override
    public List<InfoLookVO> lookTop10() {
        List<InfoLookVO> top10 = informationMapper.getLookTop10();
        return top10;
    }
}
